package com.base.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName empi_columns
 */
@TableName(value ="empi_columns")
@Data
public class EmpiColumns implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 数据源ID
     */
    private String dataSourceId;

    /**
     * 字段名称
     */
    private String aliseName;

    /**
     * 字段编码
     */
    private String fieldName;

    /**
     * 是否为标志列
     */
    private Integer isMarkey;

    /**
     * 
     */
    private Integer isEscolumn;

    /**
     * 是否写入MPI库
     */
    private Integer isInsertdb;

    /**
     * 字段类型
     */
    private String columnType;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 
     */
    private String changeColumn;

    /**
     * 
     */
    private Integer isSearch;

    /**
     * 
     */
    private String columnName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmpiColumns other = (EmpiColumns) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDataSourceId() == null ? other.getDataSourceId() == null : this.getDataSourceId().equals(other.getDataSourceId()))
            && (this.getAliseName() == null ? other.getAliseName() == null : this.getAliseName().equals(other.getAliseName()))
            && (this.getFieldName() == null ? other.getFieldName() == null : this.getFieldName().equals(other.getFieldName()))
            && (this.getIsMarkey() == null ? other.getIsMarkey() == null : this.getIsMarkey().equals(other.getIsMarkey()))
            && (this.getIsEscolumn() == null ? other.getIsEscolumn() == null : this.getIsEscolumn().equals(other.getIsEscolumn()))
            && (this.getIsInsertdb() == null ? other.getIsInsertdb() == null : this.getIsInsertdb().equals(other.getIsInsertdb()))
            && (this.getColumnType() == null ? other.getColumnType() == null : this.getColumnType().equals(other.getColumnType()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getChangeColumn() == null ? other.getChangeColumn() == null : this.getChangeColumn().equals(other.getChangeColumn()))
            && (this.getIsSearch() == null ? other.getIsSearch() == null : this.getIsSearch().equals(other.getIsSearch()))
            && (this.getColumnName() == null ? other.getColumnName() == null : this.getColumnName().equals(other.getColumnName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDataSourceId() == null) ? 0 : getDataSourceId().hashCode());
        result = prime * result + ((getAliseName() == null) ? 0 : getAliseName().hashCode());
        result = prime * result + ((getFieldName() == null) ? 0 : getFieldName().hashCode());
        result = prime * result + ((getIsMarkey() == null) ? 0 : getIsMarkey().hashCode());
        result = prime * result + ((getIsEscolumn() == null) ? 0 : getIsEscolumn().hashCode());
        result = prime * result + ((getIsInsertdb() == null) ? 0 : getIsInsertdb().hashCode());
        result = prime * result + ((getColumnType() == null) ? 0 : getColumnType().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getChangeColumn() == null) ? 0 : getChangeColumn().hashCode());
        result = prime * result + ((getIsSearch() == null) ? 0 : getIsSearch().hashCode());
        result = prime * result + ((getColumnName() == null) ? 0 : getColumnName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dataSourceId=").append(dataSourceId);
        sb.append(", aliseName=").append(aliseName);
        sb.append(", fieldName=").append(fieldName);
        sb.append(", isMarkey=").append(isMarkey);
        sb.append(", isEscolumn=").append(isEscolumn);
        sb.append(", isInsertdb=").append(isInsertdb);
        sb.append(", columnType=").append(columnType);
        sb.append(", createDate=").append(createDate);
        sb.append(", changeColumn=").append(changeColumn);
        sb.append(", isSearch=").append(isSearch);
        sb.append(", columnName=").append(columnName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
